package com.liuzhilong.infrastructure.basic.jdk.annotation.inherit;


public class TestInherit {
    public static void main(String[] args) {
        MyAnnoI1 sub1m1 = Sub1.class.getAnnotation(MyAnnoI1.class);
        MyAnnoI2 sub1m2 = Sub1.class.getAnnotation(MyAnnoI2.class);
        MyAnnoI1 sub2m1 = Sub2.class.getAnnotation(MyAnnoI1.class);
        MyAnnoI2 sub2m2 = Sub2.class.getAnnotation(MyAnnoI2.class);
        System.out.println(sub1m1);
        System.out.println(sub1m2);
        System.out.println(sub2m1);
        System.out.println(sub2m2);
        /**
         * 执行结果
         * @com.liuzhilong.infrastructure.basic.jdk.annotation.inherit.MyAnnoI1(value=parent)
         * null
         * @com.liuzhilong.infrastructure.basic.jdk.annotation.inherit.MyAnnoI1(value=sub)
         * null
         */
    }
}
